<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			//js中定义变量var 
			var x = 10;
			var y = 20;
			
			console.log(x+y);
			
			var a = 10,b = 20;
			console.log(a*b);
			
			console.log(x);//10
			var x=100;//java中局部变量是不能重复定义
			console.log(x);//100 js语言非常灵活
			console.log(typeof(x));
			
			var x="abc";//类型可以改变，java中不行
			console.log(x);
			console.log(typeof(x));
		</script>
	</head>
	<body>
		
	</body>
</html>
